from fastapi import FastAPI
import uvicorn
# 创建app对象
app = FastAPI()

# 路由函数（路径函数）
@app.get("/")
async def home():
    return {"message":"Hello World"}


if __name__ == "__main__":
    uvicorn.run("main:app",host="127.0.0.1",port=8000, reload=True)
   